<!DOCTYPE html><!--HTML5 doctype-->
<html>
<head>
<title>Table控件</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!--<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=no" />-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<link rel="stylesheet"  type="text/css" href="../kitchensink/android.css" title="frosty"/>
<link rel="stylesheet"  type="text/css" href="../kitchensink/iphone.css" title="frosty"/>
<script type="text/javascript" charset="utf-8" src="../jq.mobi.js"></script>
<script type="text/javascript" charset="utf-8" src="../ui/jq.ui.js"></script> 
<script type="text/javascript" charset="utf-8" src="js/jq.util.table.js"></script> 
</head>
<body class="set">
<header class="headerbar" >
            <a href="javascript:$.ui.goBack();"><div class=" icon_back"></div></a>
            <div class="item flex"><h1></h1></div>
            <a href="#"><div class=" icon_set"></div></a>
</header>
       
         	<div class="set_span">
            	<p class="text">推送接收</p>
                <p class="form">
                <input type="checkbox" value="maleslider" id="slidermale" name="gender" class="jq-ui-slider"> 
				<label for="slidermale"></label>
                </p>
           </div>
            <button class="btn_span">
            	个人信息删除
            </button>
            <p class="set_note">个人信息清除将清空所有个人信息，且不可恢复。</p>
            <button class="btn_span">
            	版本更新检查
            </button>
        </div>
   </div>
</div>
<script type="text/javascript" >
	$.ui.ready(function(){
		var count = 0;
		function product_addHandler(){
			//console.log('sldfk');
			count++;
			var newRow = ['<input type="checkbox"  class="jq-ui-forms"/><label></label>','<button class="btn_search"></button>','<input type="input"  class="jq-ui-forms"/>','<input type="input"  class="jq-ui-forms"/>','0.00','row_'+count,'<input type="input"  class="jq-ui-forms"/>'];
			$('#tb_product').children('tbody').addRow(newRow);
			return false;//必不可少
		}
		
		function product_delHandler(){
			var len = $('#tb_product').children('tbody').countRow();
			console.log('len before:'+len);
			var index = 0;
			if(len > 0){
				index = len-1;
			}
			
			console.log($('#tb_product').children('tbody').row(0));
			$('#tb_product').children('tbody').removeRow(0);
			len = $('#tb_product').children('tbody').countRow();
			console.log('len after:'+len);
			return false;
		}
		
		
		
		$("#product_del").bind('click',product_delHandler);
		$("#product_add").bind('click',product_addHandler);
		
	});
	

</script>
</body>
</html>
